package com.muyu.system.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 书画市场订单详情对象 danmo_market_order_details
 *
 * @author kunzong
 * @date 2024-12-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class DanmoMarketOrderDetails extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 书画市场详情ID
     */
    private Long id;

    /**
     * 订单ID
     */
    @Excel(name = "订单ID")
    private Long orderId;

    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    private Long productId;

    /**
     * 买家ID
     */
    @Excel(name = "买家ID")
    private Long buyersId;

    /**
     * 商品状态
     */
    @Excel(name = "商品状态")
    private String marketState;

    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    private String deliveryAddress;

    /**
     * 快递
     */
    @Excel(name = "快递")
    private String posExpress;

    /**
     * 快递单号
     */
    @Excel(name = "快递单号")
    private Long expressDeliveryNumber;

    /**
     * 付款方式
     */
    @Excel(name = "付款方式")
    private Long paymentMethod;


    /**
     * 上架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shelfTime;

    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    /**
     * 付款时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    /**
     * 成交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "成交时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date transactionTime;

    /**
     * 取消订单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancellationTime;
    /**
     * 地址ID
     */
    @Excel(name = "地址ID")
    private Long addressesId;

    /**
     * 单价
     */
    @Excel(name = "单价")
    private BigDecimal unitPrice;

    /**
     * 商品信息
     */
    @Excel(name = "商品信息")
    private DanmoMarketProducts danmoMarketProducts;

    /**
     * 商品图片
     */
    @Excel(name = "商品图片")
    private String picture;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    private String productName;

    /**
     * 购买数量
     */
    @Excel(name = "购买数量")
    private Long quantity;

    private Integer pageNum = 1;
    private Integer pageSize = 10;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderId", getOrderId())
                .append("productId", getProductId())
                .append("buyersId", getBuyersId())
                .append("deliveryAddress", getDeliveryAddress())
                .append("shelfTime", getShelfTime())
                .append("orderTime", getOrderTime())
                .append("paymentTime", getPaymentTime())
                .append("deliveryTime", getDeliveryTime())
                .append("posExpress", getPosExpress())
                .append("expressDeliveryNumber", getExpressDeliveryNumber())
                .append("transactionTime", getTransactionTime())
                .append("cancellationTime", getCancellationTime())
                .append("unitPrice", getUnitPrice())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("quantity", getQuantity())
                .append("remark", getRemark())
                .toString();
    }
}
